<template>
  <Dialog width="75%" :title="dialogTitle" v-model="dialogVisible">
    <el-table  :data="tableData" border show-summary >
      <el-table-column align="center" prop="id" label="ID" width="80" />
      <el-table-column align="center"  prop="" label="客户名称" width="100"/>
      <el-table-column align="center"  prop=""  label="销售单号" width="180" />
      <el-table-column align="center"  prop=""  label="订单时间" width="100" />
      <el-table-column align="center"  prop=""  label="订单状态" width="100" />
      <el-table-column align="center"  prop=""  label="车型" width="180" />
      <el-table-column align="center"  prop=""  label="产品名称" width="180" />
      <el-table-column align="center"  prop=""  label="提成金额" width="100" />
      <el-table-column align="center"  prop=""  label="车型" width="180" />
      <el-table-column align="center"  prop=""  label="备注" width="180" />
    </el-table>
  </Dialog>
</template>
<script setup lang="ts">

/** ERP 技师 表单 */
defineOptions({ name: 'EngineerRoyalty' })

const { t } = useI18n() // 国际化
const message = useMessage() // 消息弹窗

const dialogVisible = ref(false) // 弹窗的是否展示
const dialogTitle = ref('') // 弹窗的标题

interface Product {
  id: string
  name: string
  amount1: string
  amount2: string
  amount3: number
}
const tableData: Product[] = [
  {
    id: '12987122',
    name: 'Tom',
    amount1: '234',
    amount2: '3.2',
    amount3: 10,
  },
  {
    id: '12987123',
    name: 'Tom',
    amount1: '165',
    amount2: '4.43',
    amount3: 12,
  },
  {
    id: '12987124',
    name: 'Tom',
    amount1: '324',
    amount2: '1.9',
    amount3: 9,
  },
  {
    id: '12987125',
    name: 'Tom',
    amount1: '621',
    amount2: '2.2',
    amount3: 17,
  },
  {
    id: '12987126',
    name: 'Tom',
    amount1: '539',
    amount2: '4.1',
    amount3: 15,
  },
]

/** 打开弹窗 */
const open = async (type: string, id?: number) => {
  dialogVisible.value = true
  dialogTitle.value = type;

}
defineExpose({ open }) // 提供 open 方法，用于打开弹窗

</script>
